package com.xianggu.designMode.chainMethod.demo02;

import com.xianggu.designMode.chainMethod.demo02.impl.GeneralMannager;
import com.xianggu.designMode.chainMethod.demo02.impl.GroupLeader;
import com.xianggu.designMode.chainMethod.demo02.impl.Manager;

/**
 * @author chengjy
 * @date 2025/3/16
 */
public class AuditDemo {
    public static void main(String[] args) {
        // 设置责任链
        GroupLeader groupLeader = new GroupLeader();
        groupLeader.setNext(new GeneralMannager()).setNext(new Manager().setSupplier(() -> false));

        // 创建请假条
        LeaveRequest leaveRequest = new LeaveRequest(1 , "张三", "屁股保养");

        groupLeader.submit(leaveRequest);

    }
}
